#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "list.h"

int main ()
{

	mr_list_p plist ;


	mr_list_init(&plist, free);

	printf("list created \n ");
	printf("tester for list\n ");
	int i;	
	char buffer[16] = "";
	for(i=0;i<20;i++)
	{
		sprintf(buffer, "%s %d ","item",i);
		mr_list_push(plist,(void *)strdup(buffer),0);
					
	}

	mr_listnode_p pnode = NULL;
	char * ppdata = NULL;	
	//	mr_list_push(plist,"rany"+i,0);
	while(!mr_list_get_next(plist,&pnode,(void **)&ppdata))
	{
	 printf("pnode ->data : %s \n" ,ppdata);
					
	}


	mr_list_destroy(plist);
	printf("list destroyed\n ");
  

return 0;
}
